﻿<UserControl x:Class="SilverlightDemo.SilverlightDemoPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Loaded="UserControl_Loaded" xmlns:SilverlightDemo="clr-namespace:SilverlightDemo" >
	<UserControl.Resources>
        <Storyboard x:Name="Intro">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="TitleTextBlock" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
            	<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            	<SplineDoubleKeyFrame KeySpline="0,0,0.328999996185303,1" KeyTime="00:00:01.3000000" Value="-1"/>
            	<SplineDoubleKeyFrame KeySpline="0.677999973297119,0,0.391999989748001,1" KeyTime="00:00:02.6000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
     
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerExample" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1010"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.8000000" Value="1010"/>
                <SplineDoubleKeyFrame KeySpline="0,0,0.398000001907349,0.999000012874603" KeyTime="00:00:02.1000000" Value="-30"/>
                <SplineDoubleKeyFrame KeySpline="0.629999995231628,0.00400000018998981,0.495999991893768,1" KeyTime="00:00:02.4000000" Value="0"/>
                <SplineDoubleKeyFrame KeySpline="0,0,0.495999991893768,1" KeyTime="00:00:02.6000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerExample" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="2"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.8000000" Value="2"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.4000000" Value="1" KeySpline="0,0,0.5,1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.6000000" Value="1" KeySpline="0,0,0.5,1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerExample" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="2"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.8000000" Value="2"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.4000000" Value="1" KeySpline="0,0,0.5,1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.6000000" Value="1" KeySpline="0,0,0.5,1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerExampleSettings" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1010"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.8000000" Value="1010"/>
                <SplineDoubleKeyFrame KeySpline="0,0,0.398000001907349,0.999000012874603" KeyTime="00:00:02.1000000" Value="-150"/>
                <SplineDoubleKeyFrame KeySpline="0.629999995231628,0.00400000018998981,0.495999991893768,1" KeyTime="00:00:02.4000000" Value="-120"/>
                <SplineDoubleKeyFrame KeySpline="0,0,0.495999991893768,1" KeyTime="00:00:02.6000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerExampleSettings" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="2"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.8000000" Value="2"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.4000000" Value="1" KeySpline="0,0,0.5,1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.6000000" Value="1" KeySpline="0,0,0.5,1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerExampleSettings" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="2"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.8000000" Value="2"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.4000000" Value="1" KeySpline="0,0,0.5,1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.6000000" Value="1" KeySpline="0,0,0.5,1"/>
            </DoubleAnimationUsingKeyFrames>
       
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerExample" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="350"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.8000000" Value="350"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.4000000" Value="0" KeySpline="0,0,0.501999974250793,1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.6000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerExampleSettings" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="350"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.8000000" Value="350"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.4000000" Value="0" KeySpline="0,0,0.497999995946884,1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.6000000" Value="0" KeySpline="0,0,0.497999995946884,1"/>
            </DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerTitleShadow" Storyboard.TargetProperty="(UIElement.Opacity)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="0.00065089238341897726"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="0.5" KeySpline="0.689000010490417,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerTitle" Storyboard.TargetProperty="(UIElement.Opacity)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="0.00065089238341897726"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="1" KeySpline="0.689000010490417,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerSettingsShadow" Storyboard.TargetProperty="(UIElement.Opacity)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="0.00065089238341897726"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="0.5" KeySpline="0.689000010490417,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerSettings" Storyboard.TargetProperty="(UIElement.Opacity)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="0.00065089238341897726"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="1" KeySpline="0.689000010490417,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerTitleShadow" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.7000000" Value="1.3" KeySpline="0,0,0.33899998664856,1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="1" KeySpline="0.689000010490417,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerTitle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.7000000" Value="1.3" KeySpline="0,0,0.33899998664856,1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="1" KeySpline="0.689000010490417,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerSettingsShadow" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.7000000" Value="1.3" KeySpline="0,0,0.33899998664856,1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="1" KeySpline="0.689000010490417,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerSettings" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.7000000" Value="1.3" KeySpline="0,0,0.33899998664856,1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="1" KeySpline="0.689000010490417,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerTitleShadow" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.7000000" Value="1.3" KeySpline="0,0,0.33899998664856,1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="1" KeySpline="0.689000010490417,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerTitle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.7000000" Value="1.3" KeySpline="0,0,0.33899998664856,1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="1" KeySpline="0.689000010490417,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerSettingsShadow" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.7000000" Value="1.3" KeySpline="0,0,0.33899998664856,1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="1" KeySpline="0.689000010490417,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerSettings" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:02.7000000" Value="1.3" KeySpline="0,0,0.33899998664856,1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="1" KeySpline="0.689000010490417,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerTitle" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)">
        		<SplineColorKeyFrame KeyTime="00:00:02.1000000" Value="#FF000000"/>
        		<SplineColorKeyFrame KeyTime="00:00:02.7000000" Value="#FFF5FF00" KeySpline="0,0,0.33899998664856,1"/>
        		<SplineColorKeyFrame KeyTime="00:00:03" Value="#FF000000" KeySpline="0.689000010490417,0,1,1"/>
        	</ColorAnimationUsingKeyFrames>
        
        	<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerSettings" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)">
        		<SplineColorKeyFrame KeyTime="00:00:02.1000000" Value="#FF000000"/>
        		<SplineColorKeyFrame KeyTime="00:00:02.7000000" Value="#FFF5FF00" KeySpline="0,0,0.33899998664856,1"/>
        		<SplineColorKeyFrame KeyTime="00:00:03" Value="#FF000000" KeySpline="0.689000010490417,0,1,1"/>
        	</ColorAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerTitleShadow" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="0"/>
        		<SplineDoubleKeyFrame KeySpline="0,0,0.33899998664856,1" KeyTime="00:00:02.7000000" Value="10"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="0"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerSettingsShadow" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="0"/>
        		<SplineDoubleKeyFrame KeySpline="0,0,0.33899998664856,1" KeyTime="00:00:02.7000000" Value="10"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="0"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerTitleShadow" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="0"/>
        		<SplineDoubleKeyFrame KeySpline="0,0,0.33899998664856,1" KeyTime="00:00:02.7000000" Value="10"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="0"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DragScrollerSettingsShadow" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
        		<SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="0"/>
        		<SplineDoubleKeyFrame KeySpline="0,0,0.33899998664856,1" KeyTime="00:00:02.7000000" Value="10"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:03" Value="0"/>
        	</DoubleAnimationUsingKeyFrames>

        </Storyboard>
        <LinearGradientBrush x:Key="GroupBackground" EndPoint="0.5,1" StartPoint="0.5,0" SpreadMethod="Pad" MappingMode="RelativeToBoundingBox">
            <GradientStop Color="#FFFFFFFF" Offset="0"/>
            <GradientStop Color="#FFFFFFFF" Offset="1"/>
            <GradientStop Color="#FF989DB4" Offset="0.518"/>
            <GradientStop Color="#FFDADBE1" Offset="0.445"/>
        </LinearGradientBrush>

    </UserControl.Resources>

        <Grid x:Name="MainGrid" >
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFFFFFFF" Offset="0"/>
                <GradientStop Color="#FFDADBE1" Offset="0.2"/>
                <GradientStop Color="#FF7B8097" Offset="0.7"/>
                <GradientStop Color="#FFFFFFFF" Offset="1"/>
            </LinearGradientBrush>
        </Grid.Background>
        <Grid.RowDefinitions >
            <RowDefinition Height="50" />
            <RowDefinition Height="500" />
            <RowDefinition Height="150" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="500" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
      

            <TextBlock Grid.Row="0" Grid.ColumnSpan="3" Margin="0,5,0,0" Foreground="Black"  x:Name="TitleTextBlock" HorizontalAlignment="Center" TextAlignment="Center" FontSize="24"  VerticalAlignment="Top" Text="Silverlight Controls Demo" RenderTransformOrigin="0.5,0.5" >
        	<TextBlock.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform ScaleX="1" ScaleY="1"/>
        			<SkewTransform AngleX="0" AngleY="0"/>
        			<RotateTransform Angle="0"/>
        			<TranslateTransform X="0" Y="0"/>
        		</TransformGroup>
        	</TextBlock.RenderTransform>
            </TextBlock>

          


            <Grid Grid.Row="1" Grid.Column="1" RenderTransformOrigin="0.5,0.5" x:Name="DragScrollerExample" Background="{StaticResource GroupBackground}" Canvas.ZIndex="30" >
            	<Grid.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</Grid.RenderTransform>
                
                <ScrollViewer x:Name="ScrollViewerBeingWrapped" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible" BorderBrush="{x:Null}"  >
                    <Grid >
                        <TextBlock Margin="5" TextWrapping="Wrap" >
                            <Run Text="     The Drag Scroll Viewer Adaptor can be used when you would like to augment an existing, populated ScrollViewer and would like a fast and interactive way of traversing through its contents."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Using the mouse pointer, stylus, or finger (on touch screens), you can grab and flick the content of the control.  Depending on the value of the Friction property, the content can continue moving until it reaches the boundary of the control or can stop quickly after the 'throw'."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     (Click and hold anywhere on this control/text area, move your mouse/stylus/finger), and let up on the button while moving to fling the control.  The faster you 'fling', the farther the content will scroll)" />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     The reason that this is an adaptor in Silverlight (vs. the DragScrollerControl in WPF) is because the ScrollViewer class is sealed in Silverlight and therefore cannot be augmented in the same way as in WPF.  So for Silverlight, the pattern is to create and initialize a standard ScrollViewer and then just wrap it in a new DragScrollViewerAdaptor object: 'new DragScrollViewerAdaptor(ScrollViewerBeingWrapped)'.  This adds the ability to drag and flick to the wrapped ScrollViewer." />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Notes/Issues:  If the wrapped scrollviewer programmatically changes its content, it needs to be re-wrapped in order to maintain drag scroller functionality (this is because the handler for the MouseLeftButtonDown event is assigned to the ScrollViewer's Content rather than the ScrollViewer itself, since the ScrollViewer handles this event and therefore the Drag Scroll Viewer Adaptor cannot recieve the event)." />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     ****This message is repeated to increase the size of the content to scroll through****" />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />

                                                    <Run Text="     The Drag Scroll Viewer Adaptor can be used when you would like to augment an existing, populated ScrollViewer and would like a fast and interactive way of traversing through its contents."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Using the mouse pointer, stylus, or finger (on touch screens), you can grab and flick the content of the control.  Depending on the value of the Friction property, the content can continue moving until it reaches the boundary of the control or can stop quickly after the 'throw'."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     (Click and hold anywhere on this control/text area, move your mouse/stylus/finger), and let up on the button while moving to fling the control.  The faster you 'fling', the farther the content will scroll)" />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     The reason that this is an adaptor in Silverlight (vs. the DragScrollerControl in WPF) is because the ScrollViewer class is sealed in Silverlight and therefore cannot be augmented in the same way as in WPF.  So for Silverlight, the pattern is to create and initialize a standard ScrollViewer and then just wrap it in a new DragScrollViewerAdaptor object: 'new DragScrollViewerAdaptor(ScrollViewerBeingWrapped)'.  This adds the ability to drag and flick to the wrapped ScrollViewer." />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Notes/Issues:  If the wrapped scrollviewer programmatically changes its content, it needs to be re-wrapped in order to maintain drag scroller functionality (this is because the handler for the MouseLeftButtonDown event is assigned to the ScrollViewer's Content rather than the ScrollViewer itself, since the ScrollViewer handles this event and therefore the Drag Scroll Viewer Adaptor cannot recieve the event)." />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     ****This message is repeated to increase the size of the content to scroll through****" />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                                                    <Run Text="     The Drag Scroll Viewer Adaptor can be used when you would like to augment an existing, populated ScrollViewer and would like a fast and interactive way of traversing through its contents."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Using the mouse pointer, stylus, or finger (on touch screens), you can grab and flick the content of the control.  Depending on the value of the Friction property, the content can continue moving until it reaches the boundary of the control or can stop quickly after the 'throw'."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     (Click and hold anywhere on this control/text area, move your mouse/stylus/finger), and let up on the button while moving to fling the control.  The faster you 'fling', the farther the content will scroll)" />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     The reason that this is an adaptor in Silverlight (vs. the DragScrollerControl in WPF) is because the ScrollViewer class is sealed in Silverlight and therefore cannot be augmented in the same way as in WPF.  So for Silverlight, the pattern is to create and initialize a standard ScrollViewer and then just wrap it in a new DragScrollViewerAdaptor object: 'new DragScrollViewerAdaptor(ScrollViewerBeingWrapped)'.  This adds the ability to drag and flick to the wrapped ScrollViewer." />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Notes/Issues:  If the wrapped scrollviewer programmatically changes its content, it needs to be re-wrapped in order to maintain drag scroller functionality (this is because the handler for the MouseLeftButtonDown event is assigned to the ScrollViewer's Content rather than the ScrollViewer itself, since the ScrollViewer handles this event and therefore the Drag Scroll Viewer Adaptor cannot recieve the event)." />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     ****This message is repeated to increase the size of the content to scroll through****" />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                                                    <Run Text="     The Drag Scroll Viewer Adaptor can be used when you would like to augment an existing, populated ScrollViewer and would like a fast and interactive way of traversing through its contents."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Using the mouse pointer, stylus, or finger (on touch screens), you can grab and flick the content of the control.  Depending on the value of the Friction property, the content can continue moving until it reaches the boundary of the control or can stop quickly after the 'throw'."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     (Click and hold anywhere on this control/text area, move your mouse/stylus/finger), and let up on the button while moving to fling the control.  The faster you 'fling', the farther the content will scroll)" />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     The reason that this is an adaptor in Silverlight (vs. the DragScrollerControl in WPF) is because the ScrollViewer class is sealed in Silverlight and therefore cannot be augmented in the same way as in WPF.  So for Silverlight, the pattern is to create and initialize a standard ScrollViewer and then just wrap it in a new DragScrollViewerAdaptor object: 'new DragScrollViewerAdaptor(ScrollViewerBeingWrapped)'.  This adds the ability to drag and flick to the wrapped ScrollViewer." />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Notes/Issues:  If the wrapped scrollviewer programmatically changes its content, it needs to be re-wrapped in order to maintain drag scroller functionality (this is because the handler for the MouseLeftButtonDown event is assigned to the ScrollViewer's Content rather than the ScrollViewer itself, since the ScrollViewer handles this event and therefore the Drag Scroll Viewer Adaptor cannot recieve the event)." />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     ****This message is repeated to increase the size of the content to scroll through****" />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                                                    <Run Text="     The Drag Scroll Viewer Adaptor can be used when you would like to augment an existing, populated ScrollViewer and would like a fast and interactive way of traversing through its contents."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Using the mouse pointer, stylus, or finger (on touch screens), you can grab and flick the content of the control.  Depending on the value of the Friction property, the content can continue moving until it reaches the boundary of the control or can stop quickly after the 'throw'."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     (Click and hold anywhere on this control/text area, move your mouse/stylus/finger), and let up on the button while moving to fling the control.  The faster you 'fling', the farther the content will scroll)" />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     The reason that this is an adaptor in Silverlight (vs. the DragScrollerControl in WPF) is because the ScrollViewer class is sealed in Silverlight and therefore cannot be augmented in the same way as in WPF.  So for Silverlight, the pattern is to create and initialize a standard ScrollViewer and then just wrap it in a new DragScrollViewerAdaptor object: 'new DragScrollViewerAdaptor(ScrollViewerBeingWrapped)'.  This adds the ability to drag and flick to the wrapped ScrollViewer." />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Notes/Issues:  If the wrapped scrollviewer programmatically changes its content, it needs to be re-wrapped in order to maintain drag scroller functionality (this is because the handler for the MouseLeftButtonDown event is assigned to the ScrollViewer's Content rather than the ScrollViewer itself, since the ScrollViewer handles this event and therefore the Drag Scroll Viewer Adaptor cannot recieve the event)." />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     ****This message is repeated to increase the size of the content to scroll through****" />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                                                    <Run Text="     The Drag Scroll Viewer Adaptor can be used when you would like to augment an existing, populated ScrollViewer and would like a fast and interactive way of traversing through its contents."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Using the mouse pointer, stylus, or finger (on touch screens), you can grab and flick the content of the control.  Depending on the value of the Friction property, the content can continue moving until it reaches the boundary of the control or can stop quickly after the 'throw'."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     (Click and hold anywhere on this control/text area, move your mouse/stylus/finger), and let up on the button while moving to fling the control.  The faster you 'fling', the farther the content will scroll)" />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     The reason that this is an adaptor in Silverlight (vs. the DragScrollerControl in WPF) is because the ScrollViewer class is sealed in Silverlight and therefore cannot be augmented in the same way as in WPF.  So for Silverlight, the pattern is to create and initialize a standard ScrollViewer and then just wrap it in a new DragScrollViewerAdaptor object: 'new DragScrollViewerAdaptor(ScrollViewerBeingWrapped)'.  This adds the ability to drag and flick to the wrapped ScrollViewer." />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Notes/Issues:  If the wrapped scrollviewer programmatically changes its content, it needs to be re-wrapped in order to maintain drag scroller functionality (this is because the handler for the MouseLeftButtonDown event is assigned to the ScrollViewer's Content rather than the ScrollViewer itself, since the ScrollViewer handles this event and therefore the Drag Scroll Viewer Adaptor cannot recieve the event)." />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     ****This message is repeated to increase the size of the content to scroll through****" />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                                                    <Run Text="     The Drag Scroll Viewer Adaptor can be used when you would like to augment an existing, populated ScrollViewer and would like a fast and interactive way of traversing through its contents."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Using the mouse pointer, stylus, or finger (on touch screens), you can grab and flick the content of the control.  Depending on the value of the Friction property, the content can continue moving until it reaches the boundary of the control or can stop quickly after the 'throw'."  />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     (Click and hold anywhere on this control/text area, move your mouse/stylus/finger), and let up on the button while moving to fling the control.  The faster you 'fling', the farther the content will scroll)" />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     The reason that this is an adaptor in Silverlight (vs. the DragScrollerControl in WPF) is because the ScrollViewer class is sealed in Silverlight and therefore cannot be augmented in the same way as in WPF.  So for Silverlight, the pattern is to create and initialize a standard ScrollViewer and then just wrap it in a new DragScrollViewerAdaptor object: 'new DragScrollViewerAdaptor(ScrollViewerBeingWrapped)'.  This adds the ability to drag and flick to the wrapped ScrollViewer." />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     Notes/Issues:  If the wrapped scrollviewer programmatically changes its content, it needs to be re-wrapped in order to maintain drag scroller functionality (this is because the handler for the MouseLeftButtonDown event is assigned to the ScrollViewer's Content rather than the ScrollViewer itself, since the ScrollViewer handles this event and therefore the Drag Scroll Viewer Adaptor cannot recieve the event)." />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <Run Text="     ****This message is repeated to increase the size of the content to scroll through****" />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                            <LineBreak />
                        </TextBlock>
                    </Grid>
                </ScrollViewer>

                <Border Grid.ColumnSpan="1" Grid.RowSpan="1" BorderThickness="3" BorderBrush="{StaticResource StandardBorderBrush}" />

            </Grid>
            <Grid Grid.Row="2" Grid.Column="1" RenderTransformOrigin="0.5,0.5" x:Name="DragScrollerExampleSettings" Background="{StaticResource GroupBackground}" Canvas.ZIndex="29" >
            	<Grid.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</Grid.RenderTransform>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <TextBlock TextAlignment="Right" VerticalAlignment="Center" Margin="5" ><Run Text="Friction:"/></TextBlock>
                    <Slider Grid.Column="1" Margin="5" Minimum="0" Maximum="1.0" VerticalAlignment="Center" x:Name="DragScrollFrictionSlider" ValueChanged="UpdateDragScrollFriction" />

                    <TextBlock Grid.Column="0" Grid.Row="1" TextAlignment="Right" VerticalAlignment="Center" Margin="5" ><Run Text="Show Scrollbars:"/></TextBlock>
                    <CheckBox x:Name="ShowScrollbarsCheckbox" Grid.Column="1" Grid.Row="1" Margin="5" VerticalAlignment="Center" Click="CheckBox_Click" />

                    <Border Grid.ColumnSpan="2" Grid.RowSpan="2" BorderThickness="3" BorderBrush="{StaticResource StandardBorderBrush}" />

                </Grid>
            </Grid>





            <TextBlock Height="Auto" Margin="11,36,0,0" VerticalAlignment="Top" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" TextWrapping="Wrap" FontWeight="Bold" FontFamily="Arial" FontSize="18" FontStyle="Italic" x:Name="DragScrollerTitleShadow" Canvas.ZIndex="50" RenderTransformOrigin="0.1,0.5">
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform><Run Foreground="#AA000000" Text="Drag Scroll Viewer Adaptor:"/></TextBlock>

           
            <TextBlock Height="Auto" Margin="10,35,0,0" VerticalAlignment="Top" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" TextWrapping="Wrap" FontWeight="Bold" FontFamily="Arial" FontSize="18" FontStyle="Italic" x:Name="DragScrollerTitle" Canvas.ZIndex="50" RenderTransformOrigin="0.1,0.5" Foreground="#FF000000">
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform><Run Foreground="#FF3E79FF" Text="Drag Scroll Viewer Adaptor"/></TextBlock>

        
            <TextBlock Height="Auto" Margin="11,506,0,0" VerticalAlignment="Top" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" TextWrapping="Wrap" FontWeight="Bold" FontFamily="Arial" FontSize="16" FontStyle="Italic" x:Name="DragScrollerSettingsShadow" Canvas.ZIndex="50" RenderTransformOrigin="0.1,0.5" IsHitTestVisible="False" >
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform><Run Foreground="#AA000000" Text="Settings:"/></TextBlock>

           
            <TextBlock Height="Auto" Margin="10,505,0,0" VerticalAlignment="Top" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" TextWrapping="Wrap" FontWeight="Bold" FontFamily="Arial" FontSize="16" FontStyle="Italic" x:Name="DragScrollerSettings" Canvas.ZIndex="50" RenderTransformOrigin="0.1,0.5" Foreground="#FF000000" IsHitTestVisible="False" >
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform><Run Foreground="#FF3E79FF" Text="Settings:"/></TextBlock>

        </Grid>

</UserControl>
